<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>startWith方法</title>
</head>
<body>
   <script>
      //  const str="To be,or not to be,that is the question"
      //  console.log(str.startsWith("To be"))
      //  console.log(str.startsWith("not to be"))
      //  console.log(str.startsWith("not to be",10));
      const str="pink老师在上课"
      console.log(str.startsWith("pink"))
      console.log(str.includes("老师1"))
   </script>
</body>
</html>